<template>
  <XnDialog
    custom-class="branch_dialog"
    title="加分与扣分"
    :visible.sync="calcDetailShow"
    @close="calcDetailShow = false">
    <div class="calc_list" v-for="(item, index) in list" :key="index">
      <div class="li_title" :title="item.calcScoreName">{{ item.calcScoreName }}</div>
      <div class="li_score">{{ item.score }}分</div>
    </div>
  </XnDialog>
</template>

<script>
import XnDialog from '@com/xnDialog.vue'
export default {
  props: {
    addSubList: {
      type: Array,
      default: () => [],
    },
  },
  components: { XnDialog },
  data() {
    return {
      calcDetailShow: false,
      list: [],
    }
  },
  watch: {
    addSubList: {
      handler(news) {
        this.list = news
      },
      deep: true,
      immediate: true,
    },
  },
  created() {},
  mounted() {},
  methods: {},
}
</script>

<style lang="scss" scoped>
.calc_dialog {
  display: flex;
  align-items: center;
  font-size: 20px;
  padding-left: 20px;
  color: #333;
  /deep/ .el-dialog__headerbtn .el-dialog__close {
    color: #fff;
  }
  /deep/ .el-dialog__headerbtn {
    top: 17px;
  }

  /deep/ .el-dialog__header {
    background: #004db6;
    padding: 13px 10px 10px 10px;
  }
  /deep/ .el-dialog__title {
    line-height: 6px;
    font-size: 20px;
    color: #fff;
    padding-left: 5px;
  }
  /deep/ .el-dialog__body {
    padding: 20px 20px 10px;
    font-size: 16px;
    line-height: 30px;
    /deep/.el-checkbox__label {
      font-size: 14px;
    }
  }
  .bot_tips {
    border-top: 1px solid #ececec;
    padding: 10px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
  }
  .bot_tips_btn {
    cursor: pointer;
    color: #1852a3;
    font-size: 16px;
  }
  .color_warning_dia {
    color: #e6a23c;
    font-size: 18px;
  }
  .color-font {
    font-size: 18px;
  }
  .sunmit_tips {
    margin-top: 15px;
    text-align: right;
    /deep/ .el-button--mini,
    .el-button--small {
      font-size: 16px;
    }
  }
}
.calc_list {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #ccc;
  padding: 5px 10px;
  &:last-child {
    border-bottom: 0;
  }
  &:first-child {
    padding-top: 0;
  }
  .li_title {
    flex: 1;
    margin-right: 20px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
}
.branch_dialog {
  margin: auto !important;
  /deep/.el-dialog__body {
    min-height: 0 !important;
  }
}
</style>
